{% paginate collection.products by 2 %}
  <h1>{{ collection.title }}</h1>
  {% for product in collection.products %}
    <div>
      <a href="{{ product.url | within: collection }}">{{ product.title }}</a>
      {{ product.price | money }}
      {% unless product.available %}<br><strong>sold out</strong>{% endunless %}
      <a href="{{ product.url | within: collection }}">
        <img src="{{ product.featured_image.src | img_url: 'large' }}" alt="{{ product.featured_image.alt | escape }}">
      </a>
    </div>
  {% else %}
    <p>no matches</p>
  {% endfor %}
  {% if paginate.pages > 1 %}{{ paginate | default_pagination }}{% endif %}
{% endpaginate %}

